package main

import (
	"fmt"
)

const (
	a = iota //从0开始递增
	b
	c
	d
	e = iota //继续递增
	f
	g
	h = 10 //中断递增，下与其相同
	i
	j
	k = 12
	l = iota //根据上一iota递增序列, 从a 开始应为11了
	m
	n
)

const (
	m1 = 10
	m2 = iota // 序列排到了1
	m3
	m4
	_ // 跳过
	_
	m5 //实际序列值
)

const (
	b1 = iota + 45
	b2
	b3
	b4

	c1 = iota + 99 - (b4 - b1 + 1) //想从99开始，必须减去 前面差值， 此为方式1
	c2
	c3
	c4

	tmp = iota
	d1  = iota + 9999 - tmp - 1 // tmp可算出前面个数，此为方式2
	d2
	d3
	d4
)

func main() {
	fmt.Println(a)
	fmt.Println(b)
	fmt.Println(c)
	fmt.Println(d)
	fmt.Println(e)
	fmt.Println(f)
	fmt.Println(g)
	fmt.Println(h)
	fmt.Println(i)
	fmt.Println(j)
	fmt.Println(k)
	fmt.Println(l)
	fmt.Println(m)
	fmt.Println(n)

	fmt.Println("=======")
	fmt.Println(m1)
	fmt.Println(m2)
	fmt.Println(m3)
	fmt.Println(m4)
	fmt.Println(m5)

	fmt.Println("================")
	fmt.Printf("%0d\n", b1)
	fmt.Printf("%0d\n", b2)
	fmt.Printf("%0d\n", b3)
	fmt.Printf("%0d\n", b4)

	fmt.Println("================")
	fmt.Printf("%0d\n", c1)
	fmt.Printf("%0d\n", c2)
	fmt.Printf("%0d\n", c3)
	fmt.Printf("%0d\n", c4)

	fmt.Println("================")
	fmt.Printf("%0d\n", d1)
	fmt.Printf("%0d\n", d2)
	fmt.Printf("%0d\n", d3)
	fmt.Printf("%0d\n", d4)
}
